<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #canvas {
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
            margin: auto;
            border: 1px solid #000;
        }
    </style>
</head>

<body>
    <canvas id="canvas" width="800px" height="400px"></canvas>
</body>
<script>
    const canvas = document.querySelector('#canvas')
    const context = canvas.getContext('2d');
    // Y
    context.beginPath()
    context.moveTo(135, 80)
    context.lineTo(135, 300)
    context.stroke()
    // X
    context.beginPath()
    context.moveTo(500, 300)
    context.lineTo(135, 300)
    context.stroke()
    //1
    context.beginPath()
    context.moveTo(220, 200)
    context.lineTo(135, 300)
    context.stroke()
    // 2
    context.beginPath()
    context.moveTo(220, 200)
    context.lineTo(300, 260)
    context.stroke()
    // 3
    context.beginPath()
    context.moveTo(350, 200)
    context.lineTo(300, 260)
    context.stroke()
    // 4
    context.beginPath()
    context.moveTo(350, 200)
    context.lineTo(400, 250)
    context.stroke()
    // 5
    context.beginPath()
    context.moveTo(450, 200)
    context.lineTo(400, 250)
    context.stroke()



</script>

</html>